/**
 * @param {number[]} nums
 * @return {void} Do not return anything, modify nums in-place instead.
 */
var moveZeroes = function(nums) {
    let lptr = 0,flag = false
    for(let i = 0; i < nums.length; i++) {
        if(!flag) {
            if(nums[i] == 0) {
                lptr = i
                flag = true
            }
        }
        let temp
        if(nums[i] !== 0) {
            temp = nums[lptr]
            nums[lptr] = nums[i]
            nums[i] = temp
            lptr++
        }
    }
    return nums
};